package com.example.foodwebbackend.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public class Merchant {
    private Integer merchantId;
    private String username;  // 登录用户名
    private String password;  // 登录密码
    private String merchantName;
    private String merchantAddress;
    private String contactPhone;
    private String merchantDescription;
    private String businessHours;
    private BigDecimal merchantRating;
    private Integer totalReviews;
    private String avatarPath;
    private String coverImagePath;
    private LocalDateTime registerTime;
    private LocalDateTime lastLoginTime;
    private String features;  // JSON格式存储
    private Integer isApproved;  // 0:待审核,1:已通过,2:已拒绝

    public Merchant() {}

    public Merchant(String username, String password, String merchantName, String merchantAddress, String contactPhone) {
        this.username = username;
        this.password = password;
        this.merchantName = merchantName;
        this.merchantAddress = merchantAddress;
        this.contactPhone = contactPhone;
    }

    // Getters and Setters
    public Integer getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Integer merchantId) {
        this.merchantId = merchantId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getMerchantAddress() {
        return merchantAddress;
    }

    public void setMerchantAddress(String merchantAddress) {
        this.merchantAddress = merchantAddress;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getMerchantDescription() {
        return merchantDescription;
    }

    public void setMerchantDescription(String merchantDescription) {
        this.merchantDescription = merchantDescription;
    }

    public String getBusinessHours() {
        return businessHours;
    }

    public void setBusinessHours(String businessHours) {
        this.businessHours = businessHours;
    }

    public BigDecimal getMerchantRating() {
        return merchantRating;
    }

    public void setMerchantRating(BigDecimal merchantRating) {
        this.merchantRating = merchantRating;
    }

    public Integer getTotalReviews() {
        return totalReviews;
    }

    public void setTotalReviews(Integer totalReviews) {
        this.totalReviews = totalReviews;
    }

    public String getAvatarPath() {
        return avatarPath;
    }

    public void setAvatarPath(String avatarPath) {
        this.avatarPath = avatarPath;
    }

    public String getCoverImagePath() {
        return coverImagePath;
    }

    public void setCoverImagePath(String coverImagePath) {
        this.coverImagePath = coverImagePath;
    }

    public LocalDateTime getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(LocalDateTime registerTime) {
        this.registerTime = registerTime;
    }

    public LocalDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getFeatures() {
        return features;
    }

    public void setFeatures(String features) {
        this.features = features;
    }

    public Integer getIsApproved() {
        return isApproved;
    }

    public void setIsApproved(Integer isApproved) {
        this.isApproved = isApproved;
    }

    @Override
    public String toString() {
        return "Merchant{" +
                "merchantId=" + merchantId +
                ", username='" + username + '\'' +
                ", merchantName='" + merchantName + '\'' +
                ", merchantAddress='" + merchantAddress + '\'' +
                ", contactPhone='" + contactPhone + '\'' +
                ", merchantRating=" + merchantRating +
                ", totalReviews=" + totalReviews +
                ", isApproved=" + isApproved +
                '}';
    }
} 